Page({
  onShareAppMessage() {
    return {
      title: 'radio',
      path: 'page/component/pages/radio/radio'
    }
  },

  data: {
    items: [
      {value: 'Python', name: 'Python'},
      {value: 'Java', name: 'java', checked: 'true'},
      {value: 'Javascript', name: 'javascript'},
      {value: 'C#', name: 'C#'}
    ],
    items1:[
      {value:"数据库",name:"数据库"},
      {value:"计算机组成原理",name:"计算机组成原理"},
      {value:"数据结构",name:"数据结构"},
      {value:"操作系统",name:"操作系统"}
    ]
  },

  radioChange(e) {
    console.log('radio发生change事件，携带value值为：', e.detail.value)

    const items = this.data.items
    for (let i = 0, len = items.length; i < len; ++i) {
      items[i].checked = items[i].value === e.detail.value
    }

    this.setData({
      items
    })
  }
})